package com.ykfk.cngrain.tbw.model;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.PK;
import org.nutz.dao.entity.annotation.Table;

/**
 * 
 * @类名 TbRoleModule
 * @描述 TbRoleModule 实体类 复合主键的顺序是：modCode、roleCode
 * @作者 wdfang
 * @日期 2013-1-30 下午7:20:50
 * ========修改日志=======
 *
 */
@Table("TB_ROLE_MODULE")
@PK({"modCode","roleCode"})
public class TbRoleModule {
	@Column("modCode")
	private String modCode;
	@Column("roleCode")
	private String roleCode;

	public TbRoleModule() {
	}

	public TbRoleModule(String modCode, String roleCode) {
		this.modCode = modCode;
		this.roleCode = roleCode;
	}

	public String getModCode() {
		return this.modCode;
	}

	public void setModCode(String modCode) {
		this.modCode = modCode;
	}

	public String getRoleCode() {
		return this.roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbRoleModule))
			return false;
		TbRoleModule castOther = (TbRoleModule) other;

		return ((this.getModCode() == castOther.getModCode()) || (this
				.getModCode() != null
				&& castOther.getModCode() != null && this.getModCode().equals(
				castOther.getModCode())))
				&& ((this.getRoleCode() == castOther.getRoleCode()) || (this
						.getRoleCode() != null
						&& castOther.getRoleCode() != null && this
						.getRoleCode().equals(castOther.getRoleCode())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getModCode() == null ? 0 : this.getModCode().hashCode());
		result = 37 * result
				+ (getRoleCode() == null ? 0 : this.getRoleCode().hashCode());
		return result;
	}

}